#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    : 2023/11/15 23:08
# @function: the script is used to do something.
# @version : 

# Python自带的爬虫库完成需求：urllib3 麻烦，了解但不用
import urllib3


# 创建http连接池
http_pool = urllib3.PoolManager()

# 请求网站图片资源
image_url = 'http://image11.m1905.cn/uploadfile/2021/0922/thumb_0_647_500_20210922030733993182.jpg'
response = http_pool.request('GET', image_url)
# print(response.data)

with open('2.png', 'wb') as f:
    f.write(response.data)

